home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / network / ncsasock / neterrno.h < prev    next >
Text File  |  1996-07-05  |  6KB  |  166 lines

  1. /*
  2.  * Copyright (c) 1982, 1986, 1989 Regents of the University of California.
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution is only permitted until one year after the first shipment
  6.  * of 4.4BSD by the Regents.  Otherwise, redistribution and use in source and
  7.  * binary forms are permitted provided that: (1) source distributions retain
  8.  * this entire copyright notice and comment, and (2) distributions including
  9.  * binaries display the following acknowledgement:  This product includes
  10.  * software developed by the University of California, Berkeley and its
  11.  * contributors'' in the documentation or other materials provided with the
  12.  * distribution and in all advertising materials mentioning features or use
  13.  * of this software.  Neither the name of the University nor the names of
  14.  * its contributors may be used to endorse or promote products derived from
  15.  * this software without specific prior written permission.
  16.  * THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  17.  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  18.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  19.  *
  20.  *    @(#)errno.h    7.10 (Berkeley) 6/28/90
  21.  */
  22.  
  23. #include <errno.h>
  24.  
  25. #ifndef KERNEL
  26. #ifndef _ERRNO
  27. extern int errno;            /* global error number */
  28. #endif
  29. extern long errno_long;     /* same as errno, but of known length (for variable length ints) */
  30. #endif
  31.  
  32.  
  33. #ifdef NOWAY
  34. #define    EPERM        1        /* Operation not permitted */
  35. #define    ENOENT        2        /* No such file or directory */
  36. #define    ESRCH        3        /* No such process */
  37. #define    EIO        5        /* Input/output error */
  38. #endif /* NOWAY */
  39. #define    EINTR        4        /* Interrupted system call */
  40.  
  41. #ifndef ENXIO
  42. #define    ENXIO        6        /* Device not configured */
  43. #endif /* ENXIO */
  44.  
  45. #ifdef NOWAY
  46. #define    E2BIG        7        /* Argument list too long */
  47. #define    ENOEXEC        8        /* Exec format error */
  48. #define    EBADF        9        /* Bad file descriptor */
  49. #define    ECHILD        10        /* No child processes */
  50. #define    EDEADLK        11        /* Resource deadlock avoided */
  51.                     /* 11 was EAGAIN */
  52. #endif /* NOWAY */
  53.  
  54. #ifndef ENOMEM
  55. #define    ENOMEM        12        /* Cannot allocate memory */
  56. #endif /* ENOMEM */
  57.  
  58. #ifdef NOWAY
  59. #define    EACCES        13        /* Permission denied */
  60. #endif /* NOWAY */
  61.  
  62. #ifndef EFAULT
  63. #define    EFAULT        14        /* Bad address */
  64. #endif /* EFAULT */
  65.  
  66. #ifdef NOWAY
  67. #ifndef _POSIX_SOURCE
  68. #define    ENOTBLK        15        /* Block device required */
  69. #define    EBUSY        16        /* Device busy */
  70. #endif
  71. #define    EEXIST        17        /* File exists */
  72. #define    EXDEV        18        /* Cross-device link */
  73. #define    ENODEV        19        /* Operation not supported by device */
  74. #define    ENOTDIR        20        /* Not a directory */
  75. #define    EISDIR        21        /* Is a directory */
  76. #define    EINVAL        22        /* Invalid argument */
  77. #define    ENFILE        23        /* Too many open files in system */
  78. #define    EMFILE        24        /* Too many open files */
  79. #define    ENOTTY        25        /* Inappropriate ioctl for device */
  80. #ifndef _POSIX_SOURCE
  81. #define    ETXTBSY        26        /* Text file busy */
  82. #endif
  83. #define    EFBIG        27        /* File too large */
  84. #define    ENOSPC        28        /* No space left on device */
  85. #define    ESPIPE        29        /* Illegal seek */
  86. #define    EROFS        30        /* Read-only file system */
  87. #define    EMLINK        31        /* Too many links */
  88. #define    EPIPE        32        /* Broken pipe */
  89.  
  90. /* math software */
  91. #define    EDOM        33        /* Numerical argument out of domain */
  92. #define    ERANGE        34        /* Numerical result out of range */
  93.  
  94. #endif /* NOWAY */
  95.  
  96. /* non-blocking and interrupt i/o */
  97. #define    EAGAIN        35        /* Resource temporarily unavailable */
  98. #ifndef _POSIX_SOURCE
  99. #define    EWOULDBLOCK    EAGAIN        /* Operation would block */
  100. #define    EINPROGRESS    36        /* Operation now in progress */
  101. #define    EALREADY    37        /* Operation already in progress */
  102.  
  103. /* ipc/network software -- argument errors */
  104. #define    ENOTSOCK    38        /* Socket operation on non-socket */
  105. #define    EDESTADDRREQ    39        /* Destination address required */
  106. #define    EMSGSIZE    40        /* Message too long */
  107. #define    EPROTOTYPE    41        /* Protocol wrong type for socket */
  108. #define    ENOPROTOOPT    42        /* Protocol not available */
  109. #define    EPROTONOSUPPORT    43        /* Protocol not supported */
  110. #define    ESOCKTNOSUPPORT    44        /* Socket type not supported */
  111. #define    EOPNOTSUPP    45        /* Operation not supported on socket */
  112. #define    EPFNOSUPPORT    46        /* Protocol family not supported */
  113. #define    EAFNOSUPPORT    47        /* Address family not supported by protocol family */
  114. #define    EADDRINUSE    48        /* Address already in use */
  115. #define    EADDRNOTAVAIL    49        /* Can't assign requested address */
  116.  
  117. /* ipc/network software -- operational errors */
  118. #define    ENETDOWN    50        /* Network is down */
  119. #define    ENETUNREACH    51        /* Network is unreachable */
  120. #define    ENETRESET    52        /* Network dropped connection on reset */
  121. #define    ECONNABORTED    53        /* Software caused connection abort */
  122. #define    ECONNRESET    54        /* Connection reset by peer */
  123. #define    ENOBUFS        55        /* No buffer space available */
  124. #define    EISCONN        56        /* Socket is already connected */
  125. #define    ENOTCONN    57        /* Socket is not connected */
  126. #define    ESHUTDOWN    58        /* Can't send after socket shutdown */
  127. #define    ETOOMANYREFS    59        /* Too many references: can't splice */
  128. #define    ETIMEDOUT    60        /* Connection timed out */
  129. #define    ECONNREFUSED    61        /* Connection refused */
  130.  
  131. #define    ELOOP        62        /* Too many levels of symbolic links */
  132. #endif /* _POSIX_SOURCE */
  133. #define    ENAMETOOLONG    63        /* File name too long */
  134.  
  135. /* should be rearranged */
  136. #ifndef _POSIX_SOURCE
  137. #define    EHOSTDOWN    64        /* Host is down */
  138. #define    EHOSTUNREACH    65        /* No route to host */
  139. #endif /* _POSIX_SOURCE */
  140. #define    ENOTEMPTY    66        /* Directory not empty */
  141.  
  142. /* quotas & mush */
  143. #ifndef _POSIX_SOURCE
  144. #define    EPROCLIM    67        /* Too many processes */
  145. #define    EUSERS        68        /* Too many users */
  146. #define    EDQUOT        69        /* Disc quota exceeded */
  147.  
  148. /* Network File System */
  149. #define    ESTALE        70        /* Stale NFS file handle */
  150. #define    EREMOTE        71        /* Too many levels of remote in path */
  151. #define    EBADRPC        72        /* RPC struct is bad */
  152. #define    ERPCMISMATCH    73        /* RPC version wrong */
  153. #define    EPROGUNAVAIL    74        /* RPC prog. not avail */
  154. #define    EPROGMISMATCH    75        /* Program version wrong */
  155. #define    EPROCUNAVAIL    76        /* Bad procedure for program */
  156. #endif /* _POSIX_SOURCE */
  157.  
  158. #define    ENOLCK        77        /* No locks available */
  159. #define    ENOSYS        78        /* Function not implemented */
  160.  
  161. #ifdef KERNEL
  162. /* pseudo-errors returned inside kernel to modify return to process */
  163. #define    ERESTART    -1        /* restart syscall */
  164. #define    EJUSTRETURN    -2        /* don't modify regs, just return */
  165. #endif
  166.